﻿using AppSocketModel.Alarm;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.Text;

namespace AppSocketModel
{
    /// <summary>
    /// 报警配置
    /// </summary>
    [BsonIgnoreExtraElements]
    public class AlarmDto : AlarmBaseDto
    {
        /// <summary>
        /// Id
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        [BsonRepresentation(BsonType.ObjectId)]
        public string Id { get; set; }

        /// <summary>
        /// 报警配置Id
        /// </summary>
        public string AlarmId
        {
            get
            {
                return Id;
            }
        }

        /// <summary>
        /// 企业用户:公司Id 
        /// </summary>
        public int CompanyId { set; get; }

        /// <summary>
        /// 个人用户:账户Id
        /// </summary>
        public string AccountId { set; get; }

        /// <summary>
        /// 设备IMEI号
        /// </summary>
        public string IMEI { set; get; }
         
        /// <summary>
        /// 电子围栏报警配置
        /// </summary>
        public FenceAlarmDto FenceAlarm = new FenceAlarmDto();
        
        /// <summary>
        /// 移动报警配置
        /// </summary>
        public MoveAlarmDto MoveAlarm = new MoveAlarmDto();

        /// <summary>
        /// 超速报警配置
        /// </summary>
        public OverSpeedAlarmDto OverSpeedAlarm = new OverSpeedAlarmDto();

        /// <summary>
        /// 电池低电压报警配置
        /// </summary>
        public LowPowerAlarmDto LowPowerAlarm = new LowPowerAlarmDto();

        /// <summary>
        /// 光感防拆报警配置
        /// </summary>
        public LightAlarmDto LightAlarm = new LightAlarmDto();

    }
}
